<?xml version="1.0" encoding="utf-8" ?>
<TestCase testName="Test_06_SendPortStatus">

	<TestSetup>
		<TestStep assemblyPath="BizUnitExtensions.dll" typeName="BizUnit.Extensions.ContextPopulateStep" failOnError="false">
			<ContextLoad contextKey="SendPort" keyValue="CBRUSSendPort" dataType="string" />
		</TestStep>
		<!-- Ensure port is started pre-test-->
		<!-- Stop the SendPort -->
		<TestStep assemblyPath="BizUnitExtensions.BizTalk.dll" typeName="BizUnit.Extensions.BizTalk.SendPortConductorStep">
			<DelayForCompletion>5</DelayForCompletion>
			<!-- Optional, seconds to delay for this step to complete -->
			<SendPortName takeFromCtx = "SendPort"></SendPortName>
			<Action>Start</Action>
		</TestStep>
	</TestSetup>
   
	<TestExecution>
		<!-- Stop the SendPort -->
		<TestStep assemblyPath="BizUnitExtensions.BizTalk.dll" typeName="BizUnit.Extensions.BizTalk.SendPortConductorStep">
			<DelayForCompletion>5</DelayForCompletion>
			<!-- Optional, seconds to delay for this step to complete -->
			<SendPortName takeFromCtx = "SendPort"></SendPortName>
			<Action>Stop</Action>
		</TestStep>
		
		<!-- Check the SendPort status -->
		<TestStep assemblyPath="BizUnitExtensions.BizTalk.dll" typeName="BizUnit.Extensions.BizTalk.SendPortStatusStep">
			<SendPortName takeFromCtx = "SendPort"></SendPortName>
			<Status>Stopped</Status>
		</TestStep>
		
		<!-- Start the SendPort -->
		<TestStep assemblyPath="BizUnitExtensions.BizTalk.dll" typeName="BizUnit.Extensions.BizTalk.SendPortConductorStep">
			<DelayForCompletion>5</DelayForCompletion>
			<!-- Optional, seconds to delay for this step to complete -->
			<SendPortName takeFromCtx = "SendPort"></SendPortName>
			<Action>Start</Action>
		</TestStep>
		<!-- Check the SendPort status -->
		<TestStep assemblyPath="BizUnitExtensions.BizTalk.dll" typeName="BizUnit.Extensions.BizTalk.SendPortStatusStep">
			<SendPortName takeFromCtx = "SendPort"></SendPortName>
			<Status>Started</Status>
		</TestStep>
    </TestExecution>
    
      <!-- Test cleanup: test cases should always leave the system in the state they found it -->
    <TestCleanup>
    </TestCleanup>    

</TestCase> 
